html {
    text-rendering: geometricPrecision;
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    position:absolute;
    left:0;
    top:0;
    margin:0;
    padding:0;
}

@media print {
    html {
        height: 100%;
        width: 100%;
    }

    body > * {
        display: none;
    }

    #vivliostyle-viewer-viewport {
        display: block;
    }

    body, #vivliostyle-viewer-viewport {
        /* workaround for Chrome calculating page height incorrectly */
        max-height: 100%;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
    }
    #vivliostyle-viewer-viewport > div {
        display: block !important;
        overflow: hidden;
    }
    #vivliostyle-viewer-viewport > div, #vivliostyle-viewer-viewport > div > div {
        /* workaround for Chrome calculating page height incorrectly */
        max-height: 100%;
        height: 100% !important;
    }
}
